In [1]:
import numpy as np
import os, sys
path = os.path.abspath('../library/')
if path not in sys.path:
sys.path.append(path)
from convert_to_recarray import create_gdr2mock_mag_limited_survey
In [2]:
name = 'final2'
create_gdr2mock_mag_limited_survey(nside = 512, outputDir = '../output/%s_100pc' %(name),
use_previous = False, delete_ebf = True,
fSample = 1, make_likelihood_asessment=False, r_max = 0.1,
verbose = False)
create_gdr2mock_mag_limited_survey(nside = 512, outputDir = '../output/%s_0.001' %(name),
use_previous = False, delete_ebf = True,
fSample = 0.001, make_likelihood_asessment=False)
/home/rybizki/anaconda3/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
return f(*args, **kwds)
/home/rybizki/anaconda3/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
return f(*args, **kwds)
/home/rybizki/anaconda3/lib/python3.6/site-packages/sklearn/ensemble/weight_boosting.py:29: DeprecationWarning: numpy.core.umath_tests is an internal NumPy module and should not be imported. It will be removed in a future NumPy release.
from numpy.core.umath_tests import inner1d
Galaxia spawns catalogue
########################################################################################
############################# GALAXIA OUTPUT END ##################
########################################################################################
339560
('rad', 'teff', 'vx', 'vy', 'vz', 'pz', 'px', 'py', 'feh', 'exbv_schlegel', 'lum', 'glon', 'glat', 'smass', 'age', 'grav', 'gaia_g', 'gaia_bpft', 'gaia_bpbr', 'gaia_rp', 'gaia_rvs', 'popid', 'mact')
converting to npy and appending ra and dec took 1.9 sec
0 339560
converting time and applying extinction map for 339560 sources in nside = 512 took 1.6 sec
indexing and remapping to isochrones took 2.7 sec
calculating extinction curve for all bands took 8.4 sec
339560
339467
calculated healpix
calculated pmdec pmra and rv
cleaning of data took 2.8 sec
plotting time took 1.5 sec
Total time in minutes: 0.7
Galaxia spawns catalogue
b'Galaxia-v0.81\nCODEDATAPATH=/home/rybizki/Programme/GalaxiaData/\nReading Parameter file- ../output/final2_0.001/GDR2mock_20.7Gmag.log\n--------------------------------------------------------\noutputFile GDR2mock_20.7Gmag \nmodelFile Model/population_parameters_BGM_update.ebf\ncodeDataDir /home/rybizki/Programme/GalaxiaData\noutputDir ../output/final2_0.001 \nphotoSys parsec1/GAIADR3 \nmagcolorNames gaia_g,gaia_bpft-gaia_rp\nappMagLimits[0] -1000.000000 \nappMagLimits[1] 20.700000 \nabsMagLimits[0] -1000.000000 \nabsMagLimits[1] 1000.000000 \ncolorLimits[0] -1000.000000 \ncolorLimits[1] 1000.000000 \ngeometryOption 0 \nlongitude 0.000000 \nlatitude 90.000000 \nsurveyArea 1000.000000 \nfSample 0.001000 \npopID -1 \nwarpFlareOn 1 \nseed 1 \nr_max 1000.000000 \nstarType 0 \nphotoError 0 \n--------------------------------------------------------\nReading tabulated values from file- /home/rybizki/Programme/GalaxiaData/Model/vcirc.dat\nUsing geometry: All Sky\nReading Isochrones from dir- /home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\nzsol=0.0152\n/home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\n13275 75 177\nIsochrone Grid Size: (Age bins=177,Feh bins=75,Alpha bins=1)\nTime Isochrone Reading 1.19058 \nGenerating populations................\n--------------------------------------------------------\nThin disc sigma_v=[50, 32.3, 21, 0.33, 0.33]\n [feh, dfeh]=[0.01, -0.12], [0.01, 0.18]\nThin Disk,ID=0:\nReading tree from file- /home/rybizki/Programme/GalaxiaData/BHTree-2.3/bhtree_with_wf/bhtree_0_E1.ebf\nTime Tree generation/reading = 0.618453 \nCompleted % <0..10..20..30..40..50..60..70..80..90..>\nStars spawned = 68930 \nTime Spawning= 16.4761 \n--------------------------------------------------------\nThin disc sigma_v=[50, 32.3, 21, 0.33, 0.33]\n [feh, dfeh]=[0.01, -0.12], [0.01, 0.18]\nThin Disk,ID=1:\nReading tree from file- /home/rybizki/Programme/GalaxiaData/BHTree-2.3/bhtree_with_wf/bhtree_1_E1.ebf\nTime Tree generation/reading = 0.536435 \nCompleted % <0..9..19..29..39..49..59..69..79..89..99..>\nStars spawned = 305163 \nTime Spawning= 20.3407 \n--------------------------------------------------------\nThin disc sigma_v=[50, 32.3, 21, 0.33, 0.33]\n [feh, dfeh]=[0.01, -0.12], [0.01, 0.18]\nThin Disk,ID=2:\nReading tree from file- /home/rybizki/Programme/GalaxiaData/BHTree-2.3/bhtree_with_wf/bhtree_2_E1.ebf\nTime Tree generation/reading = 0.820608 \nCompleted % <0..9..19..29..39..49..59..69..79..89..99..>\nStars spawned = 357248 \nTime Spawning= 21.3554 \n--------------------------------------------------------\nThin disc sigma_v=[50, 32.3, 21, 0.33, 0.33]\n [feh, dfeh]=[0.01, -0.12], [0.01, 0.18]\nThin Disk,ID=3:\nReading tree from file- /home/rybizki/Programme/GalaxiaData/BHTree-2.3/bhtree_with_wf/bhtree_3_E1.ebf\nTime Tree generation/reading = 0.789569 \nCompleted % <0..9..19..29..39..49..59..69..79..89..99..>\nStars spawned = 349059 \nTime Spawning= 18.908 \n--------------------------------------------------------\nThin disc sigma_v=[50, 32.3, 21, 0.33, 0.33]\n [feh, dfeh]=[0.01, -0.12], [0.01, 0.18]\nThin Disk,ID=4:\nReading tree from file- /home/rybizki/Programme/GalaxiaData/BHTree-2.3/bhtree_with_wf/bhtree_4_E1.ebf\nTime Tree generation/reading = 0.917977 \nCompleted % <0..9..19..29..39..49..59..69..79..89..99..>\nStars spawned = 704890 \nTime Spawning= 23.6713 \n--------------------------------------------------------\nThin disc sigma_v=[50, 32.3, 21, 0.33, 0.33]\n [feh, dfeh]=[0.01, -0.12], [0.01, 0.18]\nThin Disk,ID=5:\nReading tree from file- /home/rybizki/Programme/GalaxiaData/BHTree-2.3/bhtree_with_wf/bhtree_5_E1.ebf\nTime Tree generation/reading = 0.97111 \nCompleted % <0..9..19..29..39..49..59..69..79..89..99..>\nStars spawned = 752237 \nTime Spawning= 26.3531 \n--------------------------------------------------------\nThin disc sigma_v=[50, 32.3, 21, 0.33, 0.33]\n [feh, dfeh]=[0.01, -0.12], [0.01, 0.18]\nThin Disk,ID=6:\nReading tree from file- /home/rybizki/Programme/GalaxiaData/BHTree-2.3/bhtree_with_wf/bhtree_6_E1.ebf\nTime Tree generation/reading = 1.37715 \nCompleted % <0..10..20..30..40..50..60..70..80..90..>\nStars spawned = 1045511 \nTime Spawning= 42.1939 \n--------------------------------------------------------\nfeh=-0.17 sig_feh=0.27\nThick disc sigma_v=[67, 51, 42, 0.33, 0.33]\n [feh, dfeh, age, dage]=[-0.48, 0.3, 1.1e+10, 1e+09]\nThickDisk:\nReading tree from file- /home/rybizki/Programme/GalaxiaData/BHTree-2.3/bhtree_with_wf/bhtree_7_E0.ebf\nTime Tree generation/reading = 0.098519 \nCompleted % <0..9..19..29..39..49..59..69..79..89..99..>\nStars spawned = 1419213 \nTime Spawning= 11.5703 \n--------------------------------------------------------\nSpheroid sigma_v=[131, 106, 85]\n [feh, dfeh, age, dage]=[-1.5, 0.5, 1.3e+10, 0]\nSpheroid:\nReading tree from file- /home/rybizki/Programme/GalaxiaData/BHTree-2.3/bhtree_with_wf/bhtree_8_E0.ebf\nTime Tree generation/reading = 0.068506 \nCompleted % <0..9..19..29..39..49..59..69..79..89..99..>\nStars spawned = 57762 \nTime Spawning= 5.55339 \n--------------------------------------------------------\nBulge sigma_v=[113, 115, 100, 71.62]\n [feh, dfeh, age, dage]=[0, 0.2, 1e+10, 0]\nBulge:\nReading tree from file- /home/rybizki/Programme/GalaxiaData/BHTree-2.3/bhtree_with_wf/bhtree_9_E0.ebf\nTime Tree generation/reading = 1.03323 \nCompleted % <0..9..19..29..39..49..59..69..79..89..99..>\nStars spawned = 1191829 \nTime Spawning= 33.0249 \n--------------------------------------------------------\nTotal stars written 6251842 \nFile written- ../output/final2_0.001//GDR2mock_20.7Gmag.ebf\nCalulating magnitudes................\nReading Isochrones from dir- /home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\nzsol=0.0152\n/home/rybizki/Programme/GalaxiaData/Isochrones/padova/parsec1/GAIADR3\n13275 75 177\nIsochrone Grid Size: (Age bins=177,Feh bins=75,Alpha bins=1)\nTime Isochrone Reading 1.80954 \ngaia_g\ngaia_bpbr\ngaia_bpft\ngaia_rp\ngaia_rvs\nCalulating Extinction................\nTime for extinction calculation 2.2807 \nTotal Time= 235.095 \n'
########################################################################################
############################# GALAXIA OUTPUT END ##################
########################################################################################
6251842
('rad', 'teff', 'vx', 'vy', 'vz', 'pz', 'px', 'py', 'feh', 'exbv_schlegel', 'lum', 'glon', 'glat', 'smass', 'age', 'grav', 'gaia_g', 'gaia_bpft', 'gaia_bpbr', 'gaia_rp', 'gaia_rvs', 'popid', 'mact')
converting to npy and appending ra and dec took 35.0 sec
0 6251842
1000000 6251842
2000000 6251842
3000000 6251842
4000000 6251842
5000000 6251842
6000000 6251842
converting time and applying extinction map for 6251842 sources in nside = 512 took 20.7 sec
indexing and remapping to isochrones took 48.8 sec
calculating extinction curve for all bands took 168.3 sec
6251842
1636456
calculated healpix
calculated pmdec pmra and rv
cleaning of data took 15.8 sec
/home/rybizki/Desktop/Galaxia_wrap-master/library/defaults.py:9: UserWarning:
This call to matplotlib.use() has no effect because the backend has already
been chosen; matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.
The backend was *originally* set to 'module://ipykernel.pylab.backend_inline' by the following code:
File "/home/rybizki/anaconda3/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/home/rybizki/anaconda3/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/rybizki/anaconda3/lib/python3.6/site-packages/ipykernel_launcher.py", line 16, in <module>
app.launch_new_instance()
File "/home/rybizki/anaconda3/lib/python3.6/site-packages/traitlets/config/application.py", line 658, in launch_instance
app.start()
File "/home/rybizki/anaconda3/lib/python3.6/site-packages/ipykernel/kernelapp.py", line 477, in start
ioloop.IOLoop.instance().start()
File "/home/rybizki/anaconda3/lib/python3.6/site-packages/zmq/eventloop/ioloop.py", line 177, in start
super(ZMQIOLoop, self).start()
File "/home/rybizki/anaconda3/lib/python3.6/site-packages/tornado/ioloop.py", line 888, in start
handler_func(fd_obj, events)
File "/home/rybizki/anaconda3/lib/python3.6/site-packages/tornado/stack_context.py", line 277, in null_wrapper
return fn(*args, **kwargs)
File "/home/rybizki/anaconda3/lib/python3.6/site-packages/zmq/eventloop/zmqstream.py", line 440, in _handle_events
self._handle_recv()
File "/home/rybizki/anaconda3/lib/python3.6/site-packages/zmq/eventloop/zmqstream.py", line 472, in _handle_recv
self._run_callback(callback, msg)
File "/home/rybizki/anaconda3/lib/python3.6/site-packages/zmq/eventloop/zmqstream.py", line 414, in _run_callback
callback(*args, **kwargs)
File "/home/rybizki/anaconda3/lib/python3.6/site-packages/tornado/stack_context.py", line 277, in null_wrapper
return fn(*args, **kwargs)
File "/home/rybizki/anaconda3/lib/python3.6/site-packages/ipykernel/kernelbase.py", line 283, in dispatcher
return self.dispatch_shell(stream, msg)
File "/home/rybizki/anaconda3/lib/python3.6/site-packages/ipykernel/kernelbase.py", line 235, in dispatch_shell
handler(stream, idents, msg)
File "/home/rybizki/anaconda3/lib/python3.6/site-packages/ipykernel/kernelbase.py", line 399, in execute_request
user_expressions, allow_stdin)
File "/home/rybizki/anaconda3/lib/python3.6/site-packages/ipykernel/ipkernel.py", line 196, in do_execute
res = shell.run_cell(code, store_history=store_history, silent=silent)
File "/home/rybizki/anaconda3/lib/python3.6/site-packages/ipykernel/zmqshell.py", line 533, in run_cell
return super(ZMQInteractiveShell, self).run_cell(*args, **kwargs)
File "/home/rybizki/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2698, in run_cell
interactivity=interactivity, compiler=compiler, result=result)
File "/home/rybizki/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2808, in run_ast_nodes
if self.run_code(code, result):
File "/home/rybizki/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2862, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-2-33bfb5ad75d9>", line 8, in <module>
fSample = 0.001, make_likelihood_asessment=False)
File "/home/rybizki/Desktop/Galaxia_wrap-master/library/convert_to_recarray.py", line 198, in create_gdr2mock_mag_limited_survey
plot_sky_map(x,nside,fSample,appMagLimits1,outputDir,outputFile)
File "/home/rybizki/Desktop/Galaxia_wrap-master/library/util.py", line 249, in plot_sky_map
import matplotlib.pylab as plt
File "/home/rybizki/anaconda3/lib/python3.6/site-packages/matplotlib/pylab.py", line 252, in <module>
from matplotlib import cbook, mlab, pyplot as plt
File "/home/rybizki/anaconda3/lib/python3.6/site-packages/matplotlib/pyplot.py", line 71, in <module>
from matplotlib.backends import pylab_setup
File "/home/rybizki/anaconda3/lib/python3.6/site-packages/matplotlib/backends/__init__.py", line 16, in <module>
line for line in traceback.format_stack()
matplotlib.use('Agg') ## use a non-interactive Agg background
total number of stars = 1636456000
0.0
1636456000.0128925
124787178144.8272
plotting time took 8.2 sec
Total time in minutes: 8.9
In [ ]:
Content source: jan-rybizki/Galaxia_wrap
Similar notebooks: